<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html>
<head>
<title>Git in SCM Workbench - User Guide</title>
<meta charset="UTF-8" /> 
<link rel="stylesheet" type="text/css" href="scm-workbench.css" />
<link rev="made" href="mailto:barry@barrys-emacs.org" />
</head>
<body>
<h1><img src="scm-workbench_files/wb.png" width="64px" height="64px" /> Git in SCM Workbench - User Guide</h1>

<p>User guide for the Source Control Mangement (SCM) Workbench.</p>

<p><b>User Guide Sections</b></p>

<ul>
<li><a href="scm-workbench.html">Scm Workbench</a> - gettings started and common shared features.</li>
<li><a href="scm-workbench-git.html">Git in Scm Workbench</a> - git specific menus and features.</li>
<li><a href="scm-workbench-hg.html">Mercurial (hg) in Scm Workbench</a> - Mercurial specific menus and features.</li>
<li><a href="scm-workbench-svn.html">Subversion (svn) in Scm Workbench</a> - Subversion specific menus and features.</li>
</ul>

<p><b>Table of Contents</b></p>

<ul>
<li><a href="#project_settings">Git Project settings</a></li>
<li><a href="#menus">Git Specific Menus</a></li>
</ul>

<h2><a name="project_settings">Git Project settings</a></h2>
<figure>
    <img src="scm-workbench_files/wb_project_settings_git.png" />
    <figcaption>Git Project Settings</figcaption>
</figure>

<h3>Name</h3>

<p>The name of the project can be changed by editing the "Name" field.
You must pick a name that is not in use by another project.</p>

<h3>Name and Email address for commits</h3>

<p>Git needs your name and email address for each commit you make.</p>
<p>The Git Global config user.name and user.email is used unless
overridden by the Repository local config user.name and user.email.</p>

<h2><a name="menus">Git Menus</a></h2>

<figure>
<table>
<tr><td class="menu_active">Git Information</td>
    <td class="menu_active">Git Actions</td></tr>
<td valign="top">
    <div class="menu_dropdown">
    <table><!-- Git Information -->
    <tr><td><a href="#git_action_diff_head_vs_working">Diff HEAD vs. Working</a></td></tr>
    <tr><td><a href="#git_action_diff_staged_vs_working">Diff Staged vs. Working</a></td></tr>
    <tr><td><a href="#git_action_diff_head_vs_staged">Diff HEAD vs. Staged</a></td></tr>
    <tr><td><a href="#git_action_annotate">Annotate</a></td></tr>
    <tr><td><hr /></td></tr>
    <tr><td><a href="#git_action_status">Status</a></td></tr>
    <tr><td><hr /></td></tr>
    <tr><td><a href="#git_action_commit_history">Commit history</a></td></tr>
    </table></div></td>
<td valign="top">
    <div class="menu_dropdown">
    <table><!-- Git Actions -->
    <tr><td><a href="#git_action_stage">Stage</a></td></tr>
    <tr><td><a href="#git_action_unstage">Unstage</a></td></tr>
    <tr><td><a href="#git_action_revert">Revert…</a></td></tr>
    <tr><td><hr /></td></tr>
    <tr><td><a href="#git_action_rename">Rename…</a></td></tr>
    <tr><td><a href="#git_action_delete">Delete…</a></td></tr>
    <tr><td><hr /></td></tr>
    <tr><td><a href="#git_action_commit">Commit</a></td></tr>
    <tr><td><hr /></td></tr>
    <tr><td><a href="#git_action_push">Push</a></td></tr>
    <tr><td><a href="#git_action_pull">Pull</a></td></tr>
    </table></div></td>
</table>
<figcaption>Git menus.</figcaption>
</figure>

<h3><a href="#menus">Menu:</a> <a name="menu_git_information">Git Information</a></h3>


<h4><a name="git_action_diff_head_vs_working">Diff HEAD vs. Working</a></h4>

<p>Show the differences between the selected files and the HEAD version.
In other words show the work you have done.
</p>

<figure>
    <img src="scm-workbench_files/wb_diff_window.png" />
    <figcaption>Diff Window</figcaption>
</figure>


<h4><a name="git_action_diff_staged_vs_working">Diff Staged vs. Working</a></h4>

<p>Show the differences between the selected files and the Staged versions.
In other words show the work you have done since Staging.
</p>

<h4><a name="git_action_diff_head_vs_staged">Diff HEAD vs. Staged</a></h4>

<p>Show the differences between the selected files and the Staged versions.
In other words show the work that will be in the next commit.
</p>

<h4><a name="git_action_annotate">Annotate</a></h4>

<p>Show an annotated listing of the selected file showing the origin of each
line in the file. For each line the author, date and revision is listed.
</p>

<figure>
    <img src="scm-workbench_files/wb_git_annotate_window.png" />
    <figcaption>Git Annotate</figcaption>
</figure>

<p>Use this command to discover when a line of interest was introduced into
a file with the commit details.
</p>

<h4><a name="git_action_status">Status</a></h4>

<p>Show the state of the local repository.</p>

<h4><a name="git_action_commit_history">Commit history</a></h4>

<p>List the commit log of the selected files or folder. You can choose to
show all the commit messages, the last few messages or the messages between some dates.
</p>

<figure>
    <img src="scm-workbench_files/wb_commit_log_history_options_dialog.png" />
    <figcaption>Commit log history options</figcaption>
</figure>

<p>The Commit Log window shows an abbreviated listing of all the commit messages.
Select a commit to display the full log message and the changed paths.
</p>

<figure>
    <img src="scm-workbench_files/wb_git_commit_history_window.png" />
    <figcaption>Commit History Window</figcaption>
</figure>

<h5>Exploring the history</h5>

<p>By selecting a single commit you can click the Diff button to view the
differences between your copy of the file and the choosen commit.
</p>

<p>By selecting two commits you can click the Diff button to view the differences
between the pair of selected commits.
</p>

<p>By selecting a file in the CHanged Files list you can click the Diff button
to show the differences in that one file for the selected commit.</p>

<h5>Rebasing the commit history</h5>

<p>Unpushed commits are drawing in <span style="color: rbg( 192, 0, 192 )">purple</span> and may be rebased.</p>

<p>The rebase options are availble from the context menu (right-click menu).</p>

<p>There are three rebase operations supported:</p>
<ul>
<li>Reword commit message - select one unpushed commit and choose this option.</li>
<li>Squash commits together - select two or more consequtice commits and choose this option.</li>
<li>Drop commit - select unpushed commits and choose this option.</li>
</ul>

<p>The Rebase dialog shows the rebase commands that will be executed.</p>

<figure>
    <img src="scm-workbench_files/wb_git_rebase_reword_dialog.png" />
    <figcaption>Rebase reword dialog</figcaption>
</figure>

<p>For the Reword and Squash options a new commit message can be edited.</p>

<p>If Git cannot perform the rebase the errors are shown in the main windows message
panel and the errors are also shown in a pop up dialog.</p>

<h3><a href="#menus">Menu:</a> <a name="menu_hg_actions">Git Actions</a></h3>

<h4><a name="git_action_stage">Stage</a></h4>

<p>Stage the selected files so that they will be part of the next commit.
</p>

<h4><a name="git_action_unstage">Unstage</a></h4>

<p>Unstage the selected files so that they will not be part of the next commit.
</p>

<h4><a name="git_action_revert">Revert…</a></h4>

<p>The Revert command allows you to undo additions and modification to files.
</p>

<p>Added files are left as uncontrolled files. Edits to modified files are lost after a Revert.
</p>

<p>A dialog pops up to confirm the revertion.
</p>

<h4><a name="git_action_rename">Rename…</a></h4>

<p>The Rename command can work on controlled and uncontrolled files.
</p>

<p>Pop up a dialog that allows you to change the name of the selected files and folders.
</p>

<h4><a name="git_action_delete">Delete…</a></h4>

<p>The Delete command can work on controlled and uncontrolled files.
</p>

<p>Uncontrolled files are deleted. Controlled files are scheduled for deletion for the repository.
</p>

<p>A dialog pops up to confirm the deletion.
</p>

<h4><a name="git_action_commit">Commit</a></h4>

<figure>
    <img src="scm-workbench_files/wb_git_new_commit_window.png" />
    <figcaption>New Commit Window</figcaption>
</figure>

<p>You can also use commands from this window like Edit, Open, Diff
and Log History to confirm that the changes are as you expect and help
you write a suitable log message.
</p>

<p>The commit will only be allowed if there are changes and the Commit Log Message is filled in.</p>

<h4><a name="git_action_push">Push</a></h4>

<p>Push all local commits that are not in the remote repository.</p>

<p>The message window shows the abbreviated commit message of all the commits that are being pushed.</p>

<h4><a name="git_action_pull">Pull</a></h4>

<p>Pull all commits from the remote repository that are not available locally.</p>

<p>The Git Prefences allow you to select between using git rebase --merge and git pull --rebase.</p>

<p>The message window shows the abbreviated commit message of all the commits that have been pulled.</p>

<hr />
</body>
</html>
